home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15436 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  913 b 

  1. Path: cs.utk.edu!byers
  2. From: byers@duncan.cs.utk.edu (Stephen Byers)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: passing 2D arrays to functions
  5. Date: 19 Apr 1996 02:15:19 GMT
  6. Organization: Computer Science Dept, University of Tennessee, Knoxville
  7. Message-ID: <BYERS.96Apr18221519@duncan.cs.utk.edu>
  8. References: <4l58sk$l6r@harbinger.cc.monash.edu.au>
  9. NNTP-Posting-Host: duncan.cs.utk.edu
  10. In-reply-to: pdrod1@mdw084.cc.monash.edu.au's message of 18 Apr 1996 11:26:12 GMT
  11.  
  12. When you pass a two-dimensional array, it's different (a little):
  13. assume: char a[10][15];
  14.  
  15.     foo(char x[][15])
  16.     {}
  17.  
  18. then call the function:  foo(a)
  19.  
  20. The first dimension can be left out.  All the others must be included.
  21. --
  22.  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23.   Stephen Byers       Internet: byers@cs.utk.edu
  24.   Lab Assistant, Dept. of Computer Science
  25.   University of Tennessee, Knoxville
  26.  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  27.